home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / util / libs / ixemul_sdk.lha / man / cat1 / ixtrace.0 < prev   
Text File  |  1998-03-21  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4. IXTRACE(1)                                             IXTRACE(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        ixtrace - a tracer for ixemul.library
  9.  
  10. SSYYNNOOPPSSIISS
  11.        iixxttrraaccee [ --aa ] [ --ii ] [ --mm ] [ --ll ] [ --vv ] [ --ww ] [ --zz ] [
  12.        --cc syscall name ] [ --nn N ] [ --oo logfile ] [ --pp pid ] [  --ss
  13.        syscall-number ]
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.        _I_x_t_r_a_c_e  is a utility that reports every call that is made
  17.        to the _i_x_e_m_u_l_._l_i_b_r_a_r_y.  Since it  scans  every  call  made
  18.        through  the library base, it catches even more calls than
  19.        for example SnoopDOS.
  20.  
  21.        Obviously, tracing support slows down _a_l_l clients  of  the
  22.        library  (as each call is now routed through a trace func-
  23.        tion). For this reason there  are  two  library  versions.
  24.        _I_x_e_m_u_l_._l_i_b_r_a_r_y  itself  doesn't  contain  tracing support.
  25.        Using the tracer with this library gives a  "Function  not
  26.        implemented" error. To use the _i_x_t_r_a_c_e utility, you should
  27.        use the _i_x_e_m_u_l_._t_r_a_c_e library  instead  of  _i_x_e_m_u_l_._l_i_b_r_a_r_y.
  28.        See UUSSAAGGEE for more detailed instructions.
  29.  
  30.        The  option  most  often  used  is --mm, as the library uses
  31.        _s_i_g_s_e_t_m_a_s_k_(_) a lot internally, and  mentioning  this  call
  32.        again and again would just clutter the screen.
  33.  
  34. OOPPTTIIOONNSS
  35.        --aa     Print  all calls, even those considered `not inter-
  36.               esting': internal stdio-calls and 32 bit arithmetic
  37.               emulation for 68000, for example.
  38.  
  39.        --ii     Normally,  the  tracer  shows  a function call when
  40.               that function returns, to be able  to  display  the
  41.               return value (and _e_r_r_n_o in parenthesis). When --ii is
  42.               specified,  it  always  displays  the  function  on
  43.               entry,  instead  of  on exit.  See BBUUGGSS for current
  44.               problems if  you  invoke  _i_x_t_r_a_c_e  without  the  --ii
  45.               option.
  46.  
  47.        --mm     Skip  _s_i_g_s_e_t_m_a_s_k_(_)  calls.  This  function  is used
  48.               extensively inside the library, and  will  in  most
  49.               cases just clutter the tracer output.
  50.  
  51.        --ll     List  _a_l_l  system  calls to stdout. No more need to
  52.               look  up  a  call  you  want  to   trace   in   the
  53.               include/sys/syscall.def file.
  54.  
  55.        --vv     Print the current _v_e_r_s_i_o_n number.
  56.  
  57.        --ww     Wipe out the syscalls you _D_O_N_'_T want to trace.
  58.  
  59.        --zz     Allows  the  input  of  _s_y_s_c_a_l_l _n_a_m_e_s that the user
  60.               wants to trace.
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. IXTRACE(1)                                             IXTRACE(1)
  71.  
  72.  
  73.        --cc     Only print calls to  a  specific  system  call,  by
  74.               name.  Differs  from  _-_s  , which expects a syscall
  75.               number.
  76.  
  77.        --nn     Skip the first _N traces.
  78.  
  79.        --oo     Specify a logfile. If --oo is omitted, output goes to
  80.               _s_t_d_o_u_t.
  81.  
  82.        --pp     Only print output from a specific process. You have
  83.               to provide the  decimal  address  of  the  process.
  84.               Default  is  to  scan  all  current  _i_x_e_m_u_l_._l_i_b_r_a_r_y
  85.               clients.
  86.  
  87.        --ss     Only print calls to a  specific  system  call.  You
  88.               have  to specify the system call number as found in
  89.               <<ssyyss//ssyyssccaallllss..ddeeff>>.
  90.  
  91. UUSSAAGGEE
  92.        Before you can use _i_x_t_r_a_c_e, you will first have  to  flush
  93.        the  old  _i_x_e_m_u_l_._l_i_b_r_a_r_y  out of the system. The Workbench
  94.        option FFlluusshhLLiibbss can do that for you, AAvvaaiill FFLLUUSSHH achieves
  95.        the  same  from a shell. This assumes no currently running
  96.        process is using the library.
  97.  
  98.        Next make sure the system loads  _i_x_e_m_u_l_._t_r_a_c_e  instead  of
  99.        _i_x_e_m_u_l_._l_i_b_r_a_r_y  next  time  it  starts a program that uses
  100.        _i_x_e_m_u_l_._l_i_b_r_a_r_y
  101.  
  102.        You  can  do  that  by   replacing   _i_x_e_m_u_l_._l_i_b_r_a_r_y   with
  103.        _i_x_e_m_u_l_._t_r_a_c_e.  You can also use LLooaaddLLiibb iixxeemmuull..ttrraaccee.  But
  104.        LLooaaddLLiibb is not an official CLI command.
  105.  
  106.        Now Start the tracer (probably in its  own  window).   You
  107.        should  now  see  a  log of all functions called from your
  108.        program(s), and some functions called as a consequence  of
  109.        your  functions  from inside the library. A typical output
  110.        line is:
  111.  
  112.        $$77558888779900:: <<ssttrrccmmpp((""ffoooo"",, --nn ))==5577 ((00))
  113.  
  114.  
  115.        $$77558888779900
  116.               This is the process address.
  117.  
  118.        <<      Type of log, << means on exit, >> means on entry.
  119.  
  120.        ssttrrccmmpp((""ffoooo"",, --nn ))
  121.               The function with the parameters.
  122.  
  123.        ==5577    The result of the function.
  124.  
  125.        ((00))    The value of _e_r_r_n_o.
  126.  
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. IXTRACE(1)                                             IXTRACE(1)
  137.  
  138.  
  139. BBUUGGSS
  140.        There seems to be some race condition, that can result  in
  141.        deadlock when running without the --ii flag.
  142.  
  143.        Currently,  if  trace-on-exit  is enabled, the function is
  144.        called with 16 arguments, no matter how many arguments you
  145.        passed  to it. This should be enough for 99% of all appli-
  146.        cations, but you may have more  than  16  arguments  to  a
  147.        _p_r_i_n_t_f_(_) somewhere.
  148.  
  149.        Functions  returning more than a 4 byte result do _n_o_t work
  150.        unless you specify the --ii option!
  151.  
  152. HHIISSTTOORRYY
  153.        Adapted by David Zaroski from the original RREEAADDMMEE  written
  154.        by Markus Wild.
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                                                 3
  197.  
  198.  
  199.